﻿using System.Web.Routing;
using System.Web.Mvc;

namespace nsadv.Statistic.Web.Bootstrappers
{
	public class RoutesBootstrapper : Bootstrapper
	{
		public static void RegisterRoutes(RouteCollection routes)
		{
			routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
			routes.IgnoreRoute("favicon.ico");

			routes.MapRoute(
				"Default",                                              // Route name
				"{controller}/{action}/{id}",                           // URL with parameters
				new { controller = "Statistic", action = "Cabinet", id = string.Empty }  // Parameter defaults
			);
		}

		public override void Execute()
		{
			RegisterRoutes(RouteTable.Routes);
		}
	}
}